package org.leo.app;

import org.leo.funny.io.WriterTemplate;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import java.io.IOException;
import java.sql.SQLException;

@SpringBootApplication
public class App {
    public static void main(String[] args) throws IOException, SQLException {
        // 创建 Spring 容器，运行 Spring Boot 应用
        var app = SpringApplication.run(App.class, args);

        // 获取自动配置的 WriterTemplate 的 Bean
        WriterTemplate writerTemplate = app.getBean(WriterTemplate.class);
        writerTemplate.write("自动配置其实很简单");
    }
}
